package com.eaoa.vo.pub.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the pub_city table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="pub_city"
 */

public abstract class BasePubCity  implements Serializable {

	public static String REF = "PubCity";
	public static String PROP_LAYER = "layer";
	public static String PROP_CITYNAME = "cityname";
	public static String PROP_SORT = "sort";
	public static String PROP_PARENTNO = "parentno";
	public static String PROP_CITYNO = "cityno";
	public static String PROP_ISLOCK = "islock";


	// constructors
	public BasePubCity () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BasePubCity (java.lang.Long cityno) {
		this.setCityno(cityno);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BasePubCity (
		java.lang.Long cityno,
		java.lang.String cityname) {

		this.setCityno(cityno);
		this.setCityname(cityname);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long cityno;

	// fields
	private java.lang.String cityname;
	private java.lang.Long parentno;
	private java.lang.Long layer;
	private java.lang.Long sort;
	private java.lang.String islock;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="increment"
     *  column="cityno"
     */
	public java.lang.Long getCityno () {
		return cityno;
	}

	/**
	 * Set the unique identifier of this class
	 * @param cityno the new ID
	 */
	public void setCityno (java.lang.Long cityno) {
		this.cityno = cityno;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: cityname
	 */
	public java.lang.String getCityname () {
		return cityname;
	}

	/**
	 * Set the value related to the column: cityname
	 * @param cityname the cityname value
	 */
	public void setCityname (java.lang.String cityname) {
		this.cityname = cityname;
	}



	/**
	 * Return the value associated with the column: parentno
	 */
	public java.lang.Long getParentno () {
		return parentno;
	}

	/**
	 * Set the value related to the column: parentno
	 * @param parentno the parentno value
	 */
	public void setParentno (java.lang.Long parentno) {
		this.parentno = parentno;
	}



	/**
	 * Return the value associated with the column: layer
	 */
	public java.lang.Long getLayer () {
		return layer;
	}

	/**
	 * Set the value related to the column: layer
	 * @param layer the layer value
	 */
	public void setLayer (java.lang.Long layer) {
		this.layer = layer;
	}



	/**
	 * Return the value associated with the column: sort
	 */
	public java.lang.Long getSort () {
		return sort;
	}

	/**
	 * Set the value related to the column: sort
	 * @param sort the sort value
	 */
	public void setSort (java.lang.Long sort) {
		this.sort = sort;
	}



	/**
	 * Return the value associated with the column: islock
	 */
	public java.lang.String getIslock () {
		return islock;
	}

	/**
	 * Set the value related to the column: islock
	 * @param islock the islock value
	 */
	public void setIslock (java.lang.String islock) {
		this.islock = islock;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.eaoa.vo.pub.PubCity)) return false;
		else {
			com.eaoa.vo.pub.PubCity pubCity = (com.eaoa.vo.pub.PubCity) obj;
			if (null == this.getCityno() || null == pubCity.getCityno()) return false;
			else return (this.getCityno().equals(pubCity.getCityno()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getCityno()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getCityno().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}